package com.weipai.springboot.module.dao.impl;

import com.weipai.springboot.model.MemberLevel;
import com.weipai.springboot.module.dao.MemberLevelDao;
import com.weipai.springboot.module.mapper.MemberLevelMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author: 曹朋飞
 * @Date: 2018/09/14 20:04
 */
@Repository
public class MemberLevelDaoImpl implements MemberLevelDao {
    
    @Autowired
    private MemberLevelMapper memberLevelMapper;
    
    @Override
    public List<MemberLevel> selectAllByDel(int del, String sort, String way) {
        return memberLevelMapper.selectAllByDel(del, sort, way);
    }

    @Override
    public int insert(MemberLevel memberLevel) {
        return memberLevelMapper.insertSelective(memberLevel);
    }

    @Override
    public int updateByPrimaryKey(MemberLevel memberLevel) {
        return memberLevelMapper.updateByPrimaryKeySelective(memberLevel);
    }

    @Override
    public MemberLevel getMemberLevelById(String id) {
        return memberLevelMapper.getMemberLevelById(id);
    }

    @Override
    public int updateDel(String id) {
        return memberLevelMapper.updateDel(id);
    }

    @Override
    public int updateStatus(String id, Integer status) {
        return memberLevelMapper.updateStatus(id, status);
    }

    @Override
    public int batchDeleteById(String[] id) {
        return memberLevelMapper.batchDeleteById(id);
    }
}
